// src/main/java/com/example/service/KettleQuartzJob.java
package cn.yh.kettle_service.master.service;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class KettleQuartzJob implements Job {

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        String filePath = context.getJobDetail().getJobDataMap().getString("filePath");
        try {
            KettleJobService.runKettleNow(filePath);
        } catch (Exception e) {
            throw new JobExecutionException(e);
        }
    }
}
